$(function(){
	$('.icon-back').click(function(e) {
        window.history.back(-1);
    });
	/*澶嶅埗鍔熻兘*/
	var copy_val = '';
	function copy(obj) {
		copy_val = $(obj).data('content');
		$(obj).attr({'data-clipboard-text': copy_val});
		var clip = new ClipboardJS(obj);
		clip.on('success', function (e) {
            toast('澶嶅埗鎴愬姛');
		});
	}
	$(document).on('click','.btn-copy',function(){
		copy(this);
	});
	$(document).on('click','.icon-layer-close',function(){
		layer.closeAll();
	});
});


function toast(content,time=1) {
    layer.open({
        content: content
        , skin: 'msg'
        , time: 2
    });
}

function showLoading(content){
    layer.open({
        skin:'msg'
        ,content: '<img src="//static.dakabl.com/v1.5/static/images/loading.gif" width=40/><br/><p>' + content +'</p>'
    });
}


function hideLoading() {
    layer.closeAll();
}